package com.itheima.test;

import lombok.Data;

@Data
public class Hero {
    private String name;
    private double adapt;
    private int HP;
    private int AD;
    private int AP;

    public Hero() {
    }

    public Hero(String name, int HP, int AD, int AP) {
        this.name = name;
        this.HP = HP;
        this.AD = AD;
        this.AP = AP;
    }

    public void computingAdapt(){
        this.adapt = this.HP * 0.5 + this.AD * 0.2 + this.AP * 0.3;
    }

    @Override
    public String toString() {
        return name + ", " + HP + ", " + AD + ", " + AP + ", 新手适应分值: " + adapt ;
    }
}
